/*
 * @Author: zhangchaosen
 * @Date: 2024-05-20 09:29:53
 * @LastEditors: wuyang
 * @LastEditTime: 2024-06-20 14:53:30
 * @Description: 动态路由
 */
import { RouteRecordRaw } from 'vue-router'

const Layout = () => import('@/layout/index.vue')

/**
 * @description 业务模块路由
 */
export const modulesRoute: RouteRecordRaw[] = []

/**
 * @description 公共路由
 */
export const dynamicRoute: RouteRecordRaw[] = [
  {
    path: '/test',
    name: 'TestPageLayout',
    component: Layout,
    meta: { title: '测试页面', icon: 'course' },
    redirect: '/test/index',
    children: [
      {
        path: 'index',
        name: 'TestPage',
        meta: { title: '成绩管理', icon: 'eye-open' },
        component: () => import('@/views/test/index.vue')
      },
      {
        path: 'menu-1',
        name: 'TestMenu1Page',
        meta: { title: '考试管理', icon: 'logout' },
        component: () => import('@/views/test/menu-1/index.vue')
      },
      {
        path: 'menu-2',
        name: 'TestMenu2Page',
        meta: { title: '成绩申诉', icon: 'search' },
        component: () => import('@/views/test/menu-2/index.vue')
      }
    ]
  },
  ...modulesRoute
]

export default dynamicRoute
